package com.linwen.javase.desgin_pattern.structure.flyweight;

/**
 * @ClassName ConcreteFlyWeight
 * @Description
 * @Author lin
 * @Date 2022/6/22 上午1:23
 * @Version V1.0
 */
public class ConcreteFlyWeight extends FlyWeight {
    private String name;

    public ConcreteFlyWeight(String name) {
        this.name = name;
    }

    @Override
    public void operation() {
        System.out.println("具体享元为: "+name);
    }

    @Override
    public String toString() {
        return "ConcreteFlyWeight{" +
                "name='" + name + '\'' +
                '}';
    }
}
